package a.f.l.a;

import a.c.e;
import a.d.t;
import a.d.w;
import a.f.ad;

import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

class wb
  extends sb
{
  private int f;
  private e g;
  private e h;
  private t i;
  private t j;
  private a.f.c.h k;
  private boolean l;
  
  protected void c()
  {
    super.c();
    this.g = null;
    this.h = null;
    this.i = null;
    this.j = null;
    this.k = null;
  }
  
  protected void a(qb paramqb)
  {
    super.a(paramqb);
    this.k = paramqb.b();
  }
  
  protected void b(rb paramrb)
  {
    boolean bool = sb.e;
    super.b(paramrb);
    this.f = paramrb.e().f().g();
    if (!bool) {}
    this.l = (this.f > 0);
    if (!bool)
    {
      if (this.l)
      {
        this.g = paramrb.d().e();
        this.h = paramrb.d().f();
        this.i = paramrb.g().h();
      }
    }
    else {
      this.j = paramrb.i().h();
    }
  }
  
  protected double a(h paramh)
  {
    double d = 0.0D;
    if ((this.l) && (paramh.b() != null) && (a(paramh.b(), paramh.a()))) {
      d += this.f;
    }
    return d;
  }
  
  double[] a(h paramh, mb parammb, jb[] paramArrayOfjb, m[] paramArrayOfm, double[] paramArrayOfDouble)
  {
    boolean bool = sb.e;
    double d = 0.0D;
    if (!bool) {
      if (this.l)
      {
        if (bool) {
          break label43;
        }
        if (a(paramh, parammb)) {
          d = this.f;
        }
      }
    }
    label43:
    double[] arrayOfDouble = new double[paramArrayOfjb.length];
    if (!bool)
    {
      if (d > 0.0D) {
        Arrays.fill(arrayOfDouble, d);
      }
      b("punish minimal node to edge distance", d, false);
    }
    return arrayOfDouble;
  }
  
  private boolean a(mb parammb)
  {
    Iterator localIterator = b(parammb).iterator();
    while (localIterator.hasNext())
    {
      e locale = (e)localIterator.next();
      if ((!this.k.e(locale)) && (locale != this.g)) {
        return true;
      }
    }
    return false;
  }
  
  private boolean a(h paramh, mb parammb)
  {
    boolean bool = sb.e;
    mb localmb = paramh.a();
    List localList1 = c(localmb);
    List localList2 = b(localmb);
    List localList3 = b(parammb);
    e locale1 = a(localList2, localList3, localList1);
    if (locale1 != null)
    {
      if (bool) {
        break label79;
      }
      if (!a(locale1))
      {
        if (bool) {
          break label79;
        }
        if (!b(locale1)) {
          return true;
        }
      }
    }
    label79:
    List localList4 = c(parammb);
    e locale2 = b(localList2, localList3, localList4);
    if (locale2 != null)
    {
      if (!bool) {
        if (!a(locale2)) {
          if (bool) {
            break label131;
          }
        }
      }
      label131:
      int m = b(locale2) ? 1 : 0;
      if (!bool) {
        if (m == 0) {
          return false;
        }
      }
      if (!bool) {
        if (!d(paramh)) {
          return false;
        }
      }
      return true;
    }
    return false;
  }
  
  private boolean d(h paramh)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    int m = 1;
    int n = 1;
    h localh = paramh;
    label89:
    do
    {
      if (m == 0)
      {
        if (i1 != 0) {
          break label156;
        }
        if (n == 0) {
          break;
        }
      }
      if ((!bool) && (localh == null)) {
        break;
      }
      mb localmb = localh.a();
      if (!bool) {
        if (!b().b(localmb)) {
          if (bool) {
            break label89;
          }
        }
      }
      m &= (b(localmb).contains(this.g) ? 1 : 0);
      if (!bool) {
        if (!b().d(localmb)) {
          if (bool) {
            break label137;
          }
        }
      }
      n &= (b(localmb).contains(this.h) ? 1 : 0);
      localh = localh.b();
    } while (i1 == 0);
    label137:
    if (m == 0) {
      label156:
      if (bool) {}
    }
    return n == 0;
  }
  
  private boolean a(e parame)
  {
    return a(this.j, parame);
  }
  
  private boolean b(e parame)
  {
    boolean bool = sb.e;
    int m = sb.d;
    r localr = a().a(b().d());
    List localList = localr.e(false);
    if (!localList.isEmpty())
    {
      t localt = a().a().v(parame);
      Iterator localIterator = localList.iterator();
      while (localIterator.hasNext())
      {
        ad localad = (ad)localIterator.next();
        w localw = localr.a(localad, false);
        if (localt.a(localw))
        {
          if ((bool) || (m != 0)) {
            break label115;
          }
          return true;
        }
      }
    }
    label115:
    return false;
  }
  
  private boolean a(t paramt, e parame)
  {
    double d = a().c().n();
    t localt1 = a().a().v(parame);
    t localt2 = new t(localt1.d() - d, localt1.e() - d, localt1.b() + 2.0D * d, localt1.c() + 2.0D * d);
    return localt2.b(paramt);
  }
  
  private e a(List paramList1, List paramList2, List paramList3)
  {
    boolean bool = sb.e;
    Iterator localIterator = paramList2.iterator();
    while (localIterator.hasNext())
    {
      e locale = (e)localIterator.next();
      if ((!this.k.e(locale)) && ((bool) || (!paramList1.contains(locale))))
      {
        if (!bool) {
          if (!paramList3.contains(locale)) {
            return locale;
          }
        }
        if ((bool) || (paramList3.contains(this.g))) {
          if (!bool) {
            if (paramList2.size() > 1) {
              return locale;
            }
          }
        }
      }
    }
    return null;
  }
  
  private e b(List paramList1, List paramList2, List paramList3)
  {
    boolean bool = sb.e;
    Iterator localIterator = paramList1.iterator();
    while (localIterator.hasNext())
    {
      e locale = (e)localIterator.next();
      if ((!this.k.e(locale)) && ((bool) || (!paramList2.contains(locale)))) {
        if (!bool) {
          if (!paramList3.contains(locale)) {
            return locale;
          }
        }
      }
    }
    return null;
  }
  
  private List b(mb parammb)
  {
    return (List)parammb.a(nb.b);
  }
  
  private List c(mb parammb)
  {
    return (List)parammb.a(nb.a);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.a.wb

 * JD-Core Version:    0.7.0.1

 */